#ifndef _D3D11_RESOURCES_H_
#define _D3D11_RESOURCES_H_
#include "PCH.h"
#include "RenderDevice.h"
#include "DeRenderResource.h"

#define DEFINE_D3D11_RESOURCE(ResourceName, D3D11Type) \
	class DeD3D11#ResourceName : public De#ResourceName \
	{\
	public:\
		DeD3D11#ResourceName(D3D11Type* resource)				\
		: m_Resource(resource)\
		{}\
		virtual ~DeD3D11#ResourceName()\
		{\
			SAFE_RELEASE(m_Resource)\
		}\
		D3D11Type*	GetResource()\
		{\
			return m_Resource;\
		}\
		void SetResource(D3D11Type* resource)\
		{\
			m_Resource = resource;\
		}\
	private:\
		D3D11Type*	m_Resource;\
	}\

namespace DeviousRenderer
{
	DEFINE_D3D11_RESOURCE(Buffer, ID3D11Buffer);
	DEFINE_D3D11_RESOURCE(Texture1D, ID3D11Texture1D);
	DEFINE_D3D11_RESOURCE(Texture2D, ID3D11Texture2D);
	DEFINE_D3D11_RESOURCE(Texture3D, ID3D11Texture3D);
	DEFINE_D3D11_RESOURCE(RenderTargetView, ID3D11RenderTargetView);

};

}
#endif//_D3D11_RESOURCES_H_